Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Removing*variable name from first row

    I imported a dataset from excel and all the variables are named by alphabetical letters (A,B,C) and the actual variable name is in the first row of the data sheet. How do I relabel the variables, remove the variable name from the first row and then destring the variables.

    Thanks!

  • #2
    Welcome to Statalist.

    If you used Stata's File -> Import -> Excel spreadsheet menu to import your Excel file, there is a checkbox for "Import first row as variable names".

    If you used Stata's import excel command, then the output of help import excel tells you about the syntax of the command and all its options, including the firstrow option.
    Code:
        import_excel_options                 Description
        --------------------------------------------------------------------------------------------
        ...
        firstrow                             treat first row of Excel data as variable names
        ...

    Comment

    Working...
    X